vcProductNeed
A product need is an abstract object that informs Visual Components about a process that is ready for a product. vcProductNeed is the owner of a product need and has full control over the need.
See in: Overview
Module: vcProcessModel
Parent: vcObject
Children -
Referenced by: vcProductMatcher.PendingNeeds, vcProductNeedFeedMatch.MatchedNeed
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| IsCancellable | Boolean | R | Gets if the need can be cancelled. Internal needs cannot be cancelled. |
| NeedMatchType | vcProductMatchMode | R | Gets the type and requirements for matching the need with a feed. |
| ProductFilter | vcProductFilter | R | Gets the filter defining the products that the process accepts. |
| RegistrationSimTime | Real | R | Gets the time in the simulation when the need has been added to the product matcher. |
| TargetNode | vcTransportNode | R | Gets the target location of the product. This is usually the process that creates the need.See moreFor a need and feed to be matched, a valid transportation solution must exist between the feed's SourceNode and the need's TargetNode. |
| TargetProcessGroupId | String | R | Gets the name of the target process.See moreTo be matched with a feed, TargetProcessGroupId needs to have the same value as the feed's NextProcessGroupId property. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| new | vcProductNeed | vcProductFilter filter, vcTransportNode node, String id | Creates a new vcProductNeed object and returns the new need.See moreParameters: filter (vcProductFilter): The filter defining which products can be matched to this need. node (vcTransportNode): The target node of the need. targetProcessGroupId (str): The name of the target process group. Returns: vcProductNeed: The created need. |
| setOnMatched | None | Callable OR None function | Sets the callback function that is called when the need is matched with a feed.See moreParameters: function (callable): The function to call when the event is triggered. |
| tryCancel | Boolean | None | Cancels a match and removes the need from the product matcher. A match cannot be cancelled after the match has been finalized.See moreReturns: bool: True if the match was cancelled or the need was not found in the product matcher. False otherwise. Exceptions: ValueError: When the need is not cancellable due to being handled internally. |